<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<title>${appname}-<c:if test="${!empty sessionScope._local_node_session}">${sessionScope._local_node_session.nodeName}-</c:if>${si:ctname("NET_TYPE",sessionScope._netType)}</title>
<%@ include file="/WEB-INF/view/common/css_js_ace.jsp"%>
<script type="text/javascript">
$(function() {
	//$('#inputForm input').tooltip({'placement':'top'});
	$('#inputForm input').tooltip();
	//表单验证
	$('#inputForm').checkForm();

	$('#inputForm').ajaxForm({
		url : _ctx + "/usermgr/resetpwd.do",
		type : "post",
		dataType : "json",
		beforeSubmit : function() {
			$("#sbmBtn").attr("disabled", "disabled");
		},
		clearForm : false,
		resetForm : false,
		success : function(resp) {
			if (resp.status == '1') {
				var html;
				html = "<h4>您已经成功设置密码，请使用新密码登录！</h4>";
				$("#main").css("display","none");
				$("#msg").html(html);
				$("#msg").css("display","");
			} else {
				ui.msg(resp.msg, 0);
			}
			$("#sbmBtn").removeClass("disabled").attr("disabled", null);
		},
		error : function(resp) {
			ui.msg('请求发送失败', 0);
			$("#sbmBtn").removeClass("disabled").attr("disabled", null);
		}
	});
});
</script>
<style type="text/css">
.bd {
	margin: 0 auto;
	border: 1px solid #e0ded7;
	box-shadow: 0 0 5px #e0ded7;
	padding: 39px 0 50px;
}
</style>
</head>
<body>
	<div class="navbar navbar-default" id="navbar">
		<div class="navbar-container" id="navbar-container">
			<div class="navbar-header pull-left">
				<a href="#" class="navbar-brand"> <img alt=""
					src="${ctx}/static/images/logo-water.png" width="30px;"> <small>
						数据交换平台 | 重置密码 </small> </a>
			</div>
		</div>
	</div>
	<div class="main-container" id="main-container">
		<div class="main-container-inner">
			<div class="page-content">
				<div class="row">
					<div class="col-xs-2" >
					</div>
					<div class="col-xs-8 " >
						<div class="widget-box" >
							<div class="widget-body">
								<div class="bd">
									<div id="main">
									<h4>&nbsp;&nbsp;请输入新密码</h4>
									<hr>
									<form class="form-horizontal" role="form" id="inputForm"
										action="" method="post">
										<input type="hidden" id="extId" name="extId" value="${extId }">
										<div class="form-group">
											<div class="col-sm-3 control-label no-padding-right"
												for="email">新密码</div>
											<div class="col-sm-9">
												<input type="password" class="col-xs-10 col-sm-5" value=""
													min="5" max="20"
													name="pwd" id="pwd" datatype="require|limit"  msg="请输入密码|密码长度错误，长度应为[5~20]！"
													title="新密码" placeholder="请输入密码" />
											</div>
										</div>
										<div class="form-group">
											<div class="col-sm-3 control-label no-padding-right"
												for="email">确认密码</div>
											<div class="col-sm-9">
												<input type="password" class="col-xs-10 col-sm-5" value=""
													min="5" max="20"
													name="pwd2" id="pwd2"  datatype="require|limit|repeat" to="pwd" msg="请输入确认密码|确认密码长度错误，长度应为[5~20]！|两次输入的密码不一致"
													title="确认密码" placeholder="请输入确认密码" />
											</div>
										</div>
										<div class="clearfix form-group">
											<div class="col-md-offset-3 col-md-9">
												<button type="submit" class="btn btn-sm btn-primary col-sm-5"
													id="sbmBtn">
													提交
												</button>
											</div>
										</div>
									</form>
									</div>
									<div id="msg" style="display: none;height: 120px;text-align: center;">
									</div>
										<a href="${ctx }/account/login.do" class="navbar-brand" > <font size="2">
											返回登录>></font> 
										</a>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>